import router from "@/router";
import NProgress from "nprogress";
import "nprogress/nprogress.css";
NProgress.configure({ showSpinner: false }); // 进度条

// 白名单路由
const whiteList = [];
router.beforeEach(async (to, from, next) => {
	NProgress.start();
	// const hasToken:string | null= localStorage.getItem("accessToken");
	// if (hasToken) {
	// 	if (to.path === "/login") {
	// 		// 如果已登录，跳转首页
	// 		next({ path: "/" });
	// 	} 
	// }
	next();
});
router.afterEach(() => {
	NProgress.done();
});